package com.smedi.ismedi.personnel.core.application.service;

import com.smedi.ismedi.personnel.core.application.command.PersonBasicCommand;
import com.smedi.ismedi.personnel.core.application.command.PersonEditCommand;
import com.smedi.ismedi.personnel.core.domain.aggregatemodel.Person;
import com.smedi.ismedi.personnel.core.domain.aggregatemodel.PersonSyncFromImis;
import com.smedi.ismedi.personnel.core.domain.aggregatemodel.SavePersonResult;

import java.util.List;

/**
 * @Author: xulinjun
 * @Date: 2021-6-8 11:12
 */
public interface PersonApplicationService {
    Person saveInternalPerson(PersonBasicCommand personBasicCommand);

    Person saveExternalPerson(PersonBasicCommand personBasicCommand);

    Person savePersonInfoWithOutImage(PersonSyncFromImis personSyncFromImis, Long hrOrganizationId);

    Person saveProjectPersonInfoWithOutImage(PersonSyncFromImis personSyncFromImis, Long projectId, Long projectOrganizationId);

    Boolean checkHrOrganizationHasPerson(Long hrOrganizationId);

    Boolean checkPersonIsInternal(Long personId);

    Boolean checkPersonIsExternal(Long personId);

    Boolean checkPersonAvailable(Long personId);

    void editPersonStatus(Long personId, boolean enable);

    void deletePersonBasicAndAllAssignments(Long personId);

    boolean postBatchAddExistingPerson(List<Long> personIds, long organizationId);

    void editPerson(PersonEditCommand personEditCommand);
}
